fix: restore MCP SDK v1 interoperability - #237
Open
hyknerf wants to merge 1 commit into
Open
Conversation
Revert the beta v2 client migration while retaining later adapter features, OAuth issuer protections, mixed-schema validation, and client conformance coverage. Constraint: Preserve all independent fixes and features added after PR nicobailon#210 Rejected: Add only an issuer-validation opt-out | does not address broader deployed-server regressions Confidence: high Scope-risk: broad
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore the adapter's main MCP client and test servers to
@modelcontextprotocol/sdkv1. Remove the exact-pinned@modelcontextprotocol/client@2.0.0-beta.5and@modelcontextprotocol/server@2.0.0-beta.5packages introduced by #210.This keeps all independent features and fixes added after the migration. It also keeps the client conformance harness.
Closes #236.
Why
The v2 beta passes its conformance suite, but it breaks interoperability with deployed MCP servers that work with SDK v1:
targetoption missing from mcp.jstoJsonSchemaCompatcalls modelcontextprotocol/typescript-sdk#2084server/discoverwithout reaching classicinitialize: v1.18.8 remote MCP fails:server/discoverprobe rejected by server (-32700), no fallback to classicinitializeanomalyco/opencode#39354The per-server opt-out proposed in #224 addresses only the Atlassian issuer check. It does not address the other startup, schema, and OAuth regressions.
Changes
initializeworks withoutserver/discover.Security
SDK v1 does not provide the v2 issuer-stamping types. This PR retains equivalent local protection:
Compatibility trade-off
This temporarily removes SDK v2-only protocol negotiation. A future v2 migration should wait for a stable client and include deployed-server compatibility tests for legacy initialization, mixed JSON Schema dialects, and OAuth metadata variants.
Verification
npm cinpm run --prefix examples/interactive-visualizer buildnpx tsc --noEmitnpm test— 82 files, 802 tests passednpm run test:oauth— 109 tests passednpm run test:conformance— all 26 scenarios passed or matched the reviewed baselinenpm pack --dry-run— 55 filesgit diff --checkNo package version change is included.